POV-Ray : Newsgroups : povray.binaries.programming : Color Dispersion Patch : Color Dispersion Patch Server Time
27 Apr 2024 11:11:02 EDT (-0400)
  Color Dispersion Patch  
From: Daren Scot Wilson
Date: 29 Nov 1998 02:51:43
Message: <3660C507.EE074F44@pipeline.com>
The attached file is a tarred gzipped file containing a patch and a
readme.  The patch adds color dispersion to POV-Ray 3.10 (and I assume
3.10a, but I haven't tried it yet).

There are two new keywords:  dispersion and disp_nelems.  Use them like
this:

sphere { <...someplace...>, R
	pigment { color rgbf <1,1,1,1> }
	finish {
		ambient 0
		phong .3
		phong_size 120
	}
	interior {
		ior  1.3
		dispersion 1.05
		disp_nelems 15
	}
}


The dispersion value is the ratio of IOR values for violet to red.  Good
numbers are 1.01 to 1.1.    The IOR value given by the ior keyword is
taken to be for yellow-green, the color at the center of the spectrum.

The disp_nelems is optional, but the default value I gave it is only 7,
too small if the dispersion value is large, like > 1.1 or so.  

Because the dispersion modification was built on a version of source
code I had already added some features to, you get some other features: 
keywords #endif and #endwhile, to be paired with #if and #while
statements (only for the Human's convenience), and new degree-trig
functions  sind, cosd, tand, asind, acosd, atan2d  which take or return
degrees instead of radians.  Someday, I will separate the dispersion and
degrees-trig features as separate patches.  Someday....

Everything on my web site about dispersion that you've read before Nov.
29 1998 is obsolete. That was a clumsy brute-force algorithm that
affected many source code files. This patch is a new algorithm that
affects only one subroutine in one file, plus simple changes to add new
keywords to the parser.  It should be easy to combine with other
patches.

An example image will be posted to povray.binaries.images and
povray.binaries.scene-files.  All this stuff will appear on my web page
at http://www.newcolor.com/darenw/dswpov/disp.html.  (In a couple of
days)

Be careful, as this is the *first* release to the world of this patch. 
It works on my machine, but if it doesn't on yours, send me e-mail and
we'll fix it.  Stay tuned for corrections, updates, etc...

-- 

Daren Scot Wilson
Member, ACM
dar### [at] pipelinecom
www.newcolor.com
--
"A ship in a harbor is safe, but that is not what ships are built for"
                     -- William Shedd


Post a reply to this message


Attachments:
Download 'dswpov-disp.tgz.gz' (11 KB)

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.